import Vue from "vue";
import Router from "vue-router";
import Login from "@/page/Login.vue";
import Dashboard from "@/page/Dashboard.vue";
import ManageRole from "@/page/manage/ManageRole";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login1',
      component: Login
    }, {
      path: '/login',
      name: 'Login',
      component: Login
    }, {
      path: '/dashboard',
      name: 'Dashboard',
      meta: {
        // 添加该字段，表示进入这个路由是需要登录的
        requireAuth: true,
      },
      component: Dashboard,
      children:[
        {
          path: '/manageRole',
          name: 'ManageRole',
          component: ManageRole,
        }
      ]
    }
  ]
})
